﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Palsta.Core.data;

namespace Palsta.Core.function
{
    class Xslt_concat : XsltFunction
    {
        public FieldType GetReturnType()
        {
            return FieldType.String;
        }

        public Field Execute(Field[] args)
        {
            if (args.Length != 3) return null;

            String s0 = args[0].GetStringValue();
            String s1 = args[1].GetStringValue();
            String s2 = args[2].GetStringValue();
            StringField sf = new StringField(s0 + s1 + s2);
            return sf;
        }
    }
}
